package com.infoauto.opc.gateway.service.impl;

import com.infoauto.opc.gateway.dao.MonthlyProjectDao;
import com.infoauto.opc.gateway.model.gtm4.MonthlyProject;
import com.infoauto.opc.gateway.service.MonthlyProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 月度统计分组项目
 */
@Service
public class MonthlyProjectServiceImpl implements MonthlyProjectService {
    @Autowired
    private MonthlyProjectDao dao;

    @Override
    public int insert(MonthlyProject monthlyProject) {
        return dao.insert(monthlyProject);
    }

    @Override
    public int update(MonthlyProject monthlyProject) {
        return dao.update(monthlyProject);
    }

    @Override
    //根据plc地址查询分组项目名
    public MonthlyProject selectByPlcAdrr(String plcAdrr) {
        return dao.selectByPlcAdrr(plcAdrr);
    }

    @Override
    //根据组合Id查询月产量项目
    public List<MonthlyProject> selectByGroupId(Integer groupId) {
        return dao.selectByGroupId(groupId);
    }
}
